package com.financing.platform.dao.impl;


import java.sql.SQLException;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.platform.dao.IFaRevisitTaskDao;
import com.financing.platform.dto.FaRevisitTaskDTO;
import com.financing.platform.util.SqlName;
/**
 * fa_revisit_task  
 * 客户发送短信待办事项流水 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("faRevisitTaskDao")
public class FaRevisitTaskDaoImpl extends BaseDaoImpl implements IFaRevisitTaskDao {


	@Override
	public int insert(FaRevisitTaskDTO faRevisitTask) throws SQLException {
		return (Integer) this.sqlMapClient.insert(SqlName.FaRevisitTaskSql.insert, faRevisitTask);
	}

	@Override
	public void update(FaRevisitTaskDTO faRevisitTask) throws SQLException {
		this.sqlMapClient.update(SqlName.FaRevisitTaskSql.update, faRevisitTask);
	}

	@Override
	public void updateForce(FaRevisitTaskDTO faRevisitTask) throws SQLException {
		this.sqlMapClient.update(SqlName.FaRevisitTaskSql.updateForce, faRevisitTask);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClient.delete(SqlName.FaRevisitTaskSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FaRevisitTaskDTO> queryList(FaRevisitTaskDTO faRevisitTask) throws SQLException {
		return this.sqlMapClient.queryForList(SqlName.FaRevisitTaskSql.queryList, faRevisitTask);
	}

	@Override
	public int queryListCount(FaRevisitTaskDTO faRevisitTask) throws SQLException {
		return (Integer) this.sqlMapClient.queryForObject(SqlName.FaRevisitTaskSql.queryListCount, faRevisitTask);
	}

	@Override
	public FaRevisitTaskDTO loadById(Integer id) throws SQLException {
		return  (FaRevisitTaskDTO)this.sqlMapClient.queryForObject(SqlName.FaRevisitTaskSql.loadById,id);
	}
 	
}
